<template>
	<view class="reviseData" @click="toDetail(msg.id)">
		<view class="header">
			<view class="title">{{msg.name}}</view>
			<view class="status" :style="{color:colorMap[msg.approveStatus.toString()]}">
			{{statusList[msg.approveStatus]}}
			<uni-icons :color="{color:colorMap[msg.approveStatus]}" size="18" type="arrowright" />
			</view>
		</view>
		<view class="data_item">资料修改申请</view>
		<view class="detail">
			<view class="data_item" style="color: #E02020;" v-if="msg.approveStatus===3">反馈信息:{{msg.remark}}</view>
			<view class="data_item" v-if="msg.approveStatus>1">审核日期:{{msg.updateTime}}</view>
			<view class="data_item">提交日期:{{msg.createTime}}</view>
			<view class="data_item" v-if="msg.approveStatus>1">审核人:{{msg.approveName}}</view>
		</view>
		
	</view>
</template>

<script>
export default {
	props: {
		msg: {
			type: Object,
				
		},
	},
	data() {
		return {
			 statusList:['','待审批','已通过','未通过'],
			 colorMap:{
				 1:'#F7B500',
				 2:'#6DD400',
				 3:'#E02020'
			 }
		};
	},
	methods: {
		toDetail(id) {
			uni.navigateTo({
				url:`/subpages/approve/detail?id=${id}&type=1`
			});
		}
	},
};
</script>

<style lang="scss" scoped>
	.reviseData{
		padding: 24rpx 20rpx;
		background-color: #fff;
		margin-bottom: 20rpx;
		border-radius: 8rpx;
		.header{
			
			display: flex;
			justify-content: space-between;
			align-items: center;
			.title{
				width: 488rpx;
				color: #333333;
				font-size: 28rpx;
				font-weight: bold;
			}
			.status{
				display: flex;
				flex:1;
				justify-content: flex-end;
			}
		}
		.data_item{
			font-weight: 400;
			color: #999;
			padding: 4rpx 0;
			font-size: 24rpx;
		}
		.detail{
			margin-top: 16rpx;
			
		}
	}
</style>
